package com.leave.dao;

import java.util.List;

import com.leave.entity.Leave;
import com.leave.entity.User;
import com.leave.entity.UserRole;

public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

	User getUserByLoginName(String loginName);

	List<User> getAllUserByPage();
	
	List<User> getAllUserAndHasRoleByPage();

	int deleteUserByArrId(int[] arrId);

	int deletRoleOfUser(int userId);

	int addRoleOfUser(List<UserRole> userRoleList);

	List<User> getUserListByRole(String roleName);


	User getUserByLeave(Integer leaveId);
}